package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IXcxSearchnoRecordDao;
import com.financing.platform.dto.XcxSearchnoRecordDTO;
import com.financing.platform.util.SqlName;
/**
 * xcx_searchno_record  
 * 小程序产品关键字搜索未果结果记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("xcxSearchnoRecordDao")
public class XcxSearchnoRecordDaoImpl extends BaseDaoImpl implements IXcxSearchnoRecordDao {


	@Override
	public int insert(XcxSearchnoRecordDTO xcxSearchnoRecord) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.XcxSearchnoRecordSql.insert, xcxSearchnoRecord);
	}

	@Override
	public void update(XcxSearchnoRecordDTO xcxSearchnoRecord) throws SQLException {
		this.sqlMapClient.update(SqlName.XcxSearchnoRecordSql.update, xcxSearchnoRecord);
	}

	@Override
	public void updateForce(XcxSearchnoRecordDTO xcxSearchnoRecord) throws SQLException {
		this.sqlMapClient.update(SqlName.XcxSearchnoRecordSql.updateForce, xcxSearchnoRecord);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.XcxSearchnoRecordSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<XcxSearchnoRecordDTO> queryList(XcxSearchnoRecordDTO xcxSearchnoRecord) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.XcxSearchnoRecordSql.queryList, xcxSearchnoRecord);
	}

	@Override
	public int queryListCount(XcxSearchnoRecordDTO xcxSearchnoRecord) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.XcxSearchnoRecordSql.queryListCount, xcxSearchnoRecord);
	}

	@Override
	public XcxSearchnoRecordDTO loadById(Integer id) throws SQLException {
		return  (XcxSearchnoRecordDTO)this.sqlMapClient.queryForObject(SqlName.XcxSearchnoRecordSql.loadById,id);
	}

	@Override
	public List<XcxSearchnoRecordDTO> queryAllList(
			XcxSearchnoRecordDTO xcxSearchnoRecord) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.XcxSearchnoRecordSql.queryAllList, xcxSearchnoRecord);
	}

	@Override
	public void updateByKeyword(XcxSearchnoRecordDTO xcxSearchnoRecord)
			throws SQLException {
		this.sqlMapClient.update(SqlName.XcxSearchnoRecordSql.updateByKeyword, xcxSearchnoRecord);
	}

//	@Override
//	public Class<XcxSearchnoRecordDTO> getEntityClass() {
//		return XcxSearchnoRecordDTO.class;
//	}
 	
}
